# -*- coding: UTF-8 -*-

# @Time : 2020/8/25 12:22 

# @Author : litao

# @File : models.py

# Define your Model
from django import forms
from django.db import models

class Message(models.Model):
    """
    A Django model class.
    In order to use it you will need to create the database manually.

    sqlite> CREATE TABLE message (id integer primary key, subject varchar(30), content varchar(250));
    sqlite> insert into message values(1, 'subject', 'cool stuff');
    sqlite> SELECT * from message;
    """

    subject = models.CharField(max_length=30)
    content = models.TextField(max_length=250)
    class Meta:
        app_label = 'dj'
        db_table = 'message'
    def __unicode__(self):
        return self.subject + "--" + self.content

# Define your Form
class DjForm(forms.Form):
    subject = forms.CharField(max_length=100, required=True)
    content = forms.CharField()

class GraphLayout(models.Model):
    __table__='quickdraw_software_graph_layout'
    guid = models.CharField(max_length=30)
    project_guid = models.CharField(max_length=30)
    product_guid = models.CharField(max_length=30)
    sName = models.CharField(max_length=30)
    data = models.TextField()
    class Meta:
        app_label = 'dj'
        db_table = 'quickdraw_software_graph_layout'